Get My Eligible Offers

This API is used to retrieve a list of all eligible offers ('Buy Plans') granted by the parent customer. If the customer has been tagged by their parent customer as allowed for self-service, they will receive a list of all eligible offers defined by the parent customer (assuming such offers exist).

Method Path
GET /api/v2/customer/{id}/offer/my-eligible-offers

Eligibility

The requestor is eligible to request information on offers assigned to them by their parent customer if their account has been tagged as allowed for self-service.

API Request

Request Structure

Not applicable

API Response

Response Structure

Parameter Type M/O/CM Description
errorCode String O Failure code.
errorMessage String O Failure detailed description.
content Object O Array of main response body objects. Displayed when an API call is successful. For a failure, it will be empty.
pageable Object O Paging information object. Displayed when an API call is successful. For a failure, it will be empty.

Content

Parameter Type M/O/CM Description
id UUID M Offer ID
name String M Offer name
description String O Offer description
type String M Individual offer type. ENUM: RATE, MONEY, USAGE, POOL
cost Decimal M Cost of the offer. May contain decimal value. If no cost is applied, the value presented would be zero.
currency String M Cost currency. e.g., USD, GBP, EUR
creationTime DateTime M Offer creation timestamp
renewalInterval String M Renewal period interval. ENUM valid values: DAILY, WEEKLY, MONTHLY, QUARTERLY, SEMI_ANNUALLY, ANNUALLY, ONE_TIME
renewalIntervalMethod String CM Renewal day settings.
  • FIRST_DAY – Renewal day is the first day of the renewal interval. E.g., 1’st of the month per ‘MONTHLY’ interval.
  • SELF_DEFINED – Renewal day is the day defined by the user. E.g., 10’th of the month per ‘MONTHLY’ interval.
  • PLAN_ALLOCATION – Renewal day is set based on the actual plan allocation (attachment) day.
Empty for ONE_TIME renewal interval.
renewalIntervalDay Numeric CM Chosen renewal day of the selected period.
Valid values per ENUM:
  • DAILY: N/A
  • WEEKLY: 1–7
  • MONTHLY: 1–28
  • QUARTERLY: 1–90
  • SEMI_ANNUALLY: 1–180
  • ANNUALLY: 1–365
  • ONE_TIME: N/A
Populated only if SELF_DEFINED or FIRST_DAY was set per ‘renewalIntervalMethod’ attribute.
expirationType String O Expiration date settings.
ENUM valid values:
  • FIXED – Fixed predefined expiration date.
  • RELATIVE_ATTACHED – Time duration starting the time the plan was attached to the subscriber. E.g., 10 days from plan attachment to the subscriber.
  • RELATIVE_FIRST_USE – Time duration starting the time the plan was used by the subscriber. E.g., 10 days from plan consumption by the subscriber.
Plan has no expiration if it is null.
expirationDate Date CM Date settings per chosen ‘expirationType’.
Populated only if selected ‘expirationType’ is FIXED.
Empty for other expiration types or no expiration type.
expirationUnit String CM Time unit settings for expiration calculation.
ENUM Valid values: DAY, WEEK, MONTH, YEAR
Empty if selected ‘expirationType’ is FIXED or no expiration type.
expirationValue Numeric CM Time value settings per chosen ‘expirationUnit’.
Empty if selected ‘expirationType’ is FIXED or no expiration type.
isProrated Boolean M Plan proration.
True = Proration will be calculated when attaching this plan.
False = There is no proration.
Pool plan will be always marked as False.
isIncludingAccessFee Boolean M Specifies if the offer price already includes inherent access fee and surcharge fee.
True – Offer price includes access\surcharge fees. Once a calendar month, when registering on the network, the system will not charge additionally on top of the offer price.
False – Offer price does not include access\surcharge fee. Once a calendar month, when registering on the network, the system will charge the access\surcharge fees in addition to the offer price.
money Object CM Money type object.
Populated when MONEY offer type is returned.
Empty if either RATE, USAGE or POOL offer type is returned.
rate Object CM Rate type object.
Populated when RATE offer type is returned.
Empty if either USAGE, MONEY or POOL offer type is returned.
usage Object CM Usage type object.
Populated when USAGE offer type is populated.
Empty if either RATE, MONEY or POOL offer type is returned.
pool Object CM Pool plan type object.
Populated when POOL offer type is returned.
Empty if any other offer type is returned (USAGE, RATE, MONEY).
availabilityZone Object O Array of availability zones object which are assigned to this plan.
Empty array means that the plan is available in any zone.
linkedOffers Object O Array of offer\s object linked to this offer. The order of the instances in the array determines their priority for charging.
Empty array means that the created offer has no linked offers.

Money

Parameter Type M/O/CM Description
activationType String M Displays plan activation behavior. Valid values: REGULAR, FIRST_EVENT_PERIODIC, FIRST_EVENT_NON_PERIODIC

Rate

Parameter Type M/O/CM Description
type String M Rate offer type. ENUM valid values – ACCOUNT, PLAN_FIXED, PLAN_CUSTOMIZED.
dataLimit Decimal O Displays the maximal allowed DATA usage consumption.
dataLimitUnitType String CM Data limit unit type. Valid values - KB, MB, GB. Populated when data limit exists.
smsLimit Decimal O Displays the maximal allowed SMS usage consumption. Unit counting is always a ‘unit’.

Usage

Parameter Type M/O/CM Description
activationType String M Displays plan activation behavior. Valid values: REGULAR, FIRST_EVENT_PERIODIC, FIRST_EVENT_NON_PERIODIC.
usageType Object M Array of usage types object.

usageType

Parameter Type M/O/CM Description
type String M Type of the usage. Valid values: DATA, SMS.
value Decimal M Overall allowance value when regular offer or pool plan of type FIXED. Allowance value per every added subscriber when pool plan and its type is ACCUMULATIVE. Data consumption for DATA type. Unit counting for SMS type.
unitType String CM Usage unit type. DATA related valid values - KB, MB, GB. Populated when usage type is set to DATA.

Pool

Parameter Type M/O/CM Description
type String M Pool plan type. Valid values: FIXED, ACCUMULATIVE.
activationType String M Displays plan activation behavior. Valid values: REGULAR, FIRST_EVENT_PERIODIC, FIRST_EVENT_NON_PERIODIC.
poolUsageType Object M Array of usage types object.

poolUsageType

Parameter Type M/O/CM Description
type String M Type of the usage. ENUM valid values: DATA, SMS.
value Decimal M Allowance value. Data consumption for DATA type. Unit counting for SMS type.
unitType String CM Usage unit type. DATA ENUM valid values - KB, MB, GB. Mandatory for DATA usage type. Empty for SMS usage type. Ignored if populated for SMS usage type.
limitValue Decimal O Define usage limit value. Data consumption for DATA type. Unit counting for SMS type.
limitUnitType String CM Limit unit type. DATA ENUM valid values - KB, MB, GB. Mandatory when setting limit for DATA usage. Empty for SMS usage type. Ignored if populated for SMS usage type.

availabilityZone

Parameter Type M/O/CM Description
Id UUID M Customer’s availability zone’s universal unique identity.
name String M Customer’s availability zone name.

linkedOffers

Parameter Type M/O/CM Description
id UUID M Universal unique ID of the linked offer.
isPinned Boolean M Denotes whether the linked offer can be removed from the parent offer, or not. True = Linked offer is fixed and cannot be removed. False = Linked offer is not fixed and can be removed (Future feature – Currently not in use).

pageable

Parameter Type M/O/CM Description
page Numeric M Page number.
size Numeric M Page size. Number of requested elements per page.
totalPages Numeric M Total amount of available pages per requested page size.
totalElements Numeric M Total amount of retrieved elements.

Error Codes

In addition to the general success and failure codes, the following error codes are possible:

Code Message
GLOBAL_1001 Service unavailable. Please try again.
CUSTOMER_1002 Customer does not exist.
CUSTOMER_1006 Failed to retrieve customer details.

Examples

Request Body

Not applicable

Response Body Regular Plan (Money) Success ACK

Copy
{
  "errorCode": "",
  "errorMessage": "",
  "content": [
    {
      "id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
      "name": "roaming",
      "description": "roaming bundle",
      "type": "MONEY",
      "cost": 20.5,
      "currency": "USD",
      "creationTime": "2020-07-01T00:00:00.977Z",
      "renewalInterval": "MONTHLY",
      "renewalIntervalMethod": "FIRST_DAY",
      "renewalIntervalDay": "",
      "expirationType": "FIXED",
      "expirationDate": "13092023",
      "expirationUnit": "",
      "expirationValue": "",
      "isProrated": true,
      "isIncludingAccessFee": false,
      "availabilityZone": [
        {
          "id": "1b15048b-1ed4-4d34-a074-c7e26520e12a",
          "name": "North America 05"
        }
      ],
      "money": [
        {
          "activationType": "REGULAR"
        }
      ],
      "linkedOffers": [
        {
          "id": "ee74dca6-8e7f-4b85-a42b-13860913b3b1",
          "isPinned": true
        },
        {
          "id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
          "isPinned": true
        }
      ]
    },
    {
      "id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
      "name": "regular",
      "description": "regular bundle",
      "type": "MONEY",
      "cost": 10.5,
      "currency": "USD",
      "creationTime": "2020-07-01T00:00:00.977Z",
      "renewalInterval": "MONTHLY",
      "renewalIntervalMethod": "SELF_DEFINED",
      "renewalIntervalDay": "10",
      "expirationType": "RELATIVE_ATTACHED",
      "expirationDate": "",
      "expirationUnit": "WEEK",
      "expirationValue": "4",
      "isProrated": true,
      "isIncludingAccessFee": false,
      "availabilityZone": [],
      "money": [
        {
          "activationType": "REGULAR"
        }
      ],
      "linkedOffers": []
    }
  ],
  "pageable": {
    "page": 1,
    "size": 10,
    "totalPages": 1,
    "totalElements": 2
  }
}

Response Body Pool Plan Success ACK

Copy
{
  "errorCode": "",
  "errorMessage": "",
  "content": [
    {
      "id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
      "name": "family 50GB+",
      "description": "family bundle",
      "type": "POOL",
      "cost": 15,
      "currency": "USD",
      "creationTime": "2020-07-01T00:00:00.977Z",
      "renewalInterval": "MONTHLY",
      "renewalIntervalMethod": "FIRST_DAY",
      "renewalIntervalDay": "",
      "expirationType": "FIXED",
      "expirationDate": "13092023",
      "expirationUnit": "",
      "expirationValue": "",
      "isProrated": false,
      "isIncludingAccessFee": false,
      "availabilityZone": [
        {
          "id": "1b15048b-1ed4-4d34-a074-c7e26520e12a",
          "name": "North America 05"
        }
      ],
      "pool": [
        {
          "type": "FIXED",
          "activationType": "REGULAR",
          "poolUsageType": [
            {
              "type": "DATA",
              "value": 50,
              "unitType": "GB",
              "limitValue": 20,
              "limitUnitType": "GB"
            },
            {
              "type": "SMS",
              "value": 100,
              "unitType": "",
              "limitValue": 10,
              "limitUnitType": ""
            }
          ]
        }
      ],
      "linkedOffers": [
        {
          "id": "ee74dca6-8e7f-4b85-a42b-13860913b3b1",
          "isPinned": true
        },
        {
          "id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
          "isPinned": true
        }
      ]
    }
  ],
  "pageable": {
    "page": 1,
    "size": 10,
    "totalPages": 1,
    "totalElements": 2
  }
}

Response Body Failure NACK

Copy
  "errorCode": "GLOBAL_1001",
  "errorMessage": "Service unavailable. Please try again",
  "content": "",
  "pageable": ""
}